<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="box"></div>
    <script>
        // 1、获取语法
        // document.querySelector('CSS选择器')
        const box = document.querySelector('.box')
        console.dir(box)//box变量里面存的就是dom对象
    </script>
</body>

</html>